package properties;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesLoader {  
	 
    private Properties props;  
        
    public PropertiesLoader( String filename )
    {  
	   	
		try{  
			
			this.props 		= new Properties();  
			InputStream in 	= this.getClass().getResourceAsStream( filename ); 
			
		    this.props.load(in);  
		    in.close();  
		}  
		catch(IOException e)
		{
		      System.out.println( "Error: "+e.getMessage() );
		}  
		
    }  
   
     public String getValor(String chave){  
             return (String) this.props.getProperty(chave);  
     } 
     
 }  